package cn.itcast.com.day01;

import java.util.Scanner;
/*
1. 定义一个方法，实现打印n * n 乘法表  (代码 + 结果截图)
 */
public class test01 {
    public static void main(String[] args) {
        System.out.println("请输入参数");
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        f(n);
    }

    public static void f(int n){
        for (int i = 1; i <= n; i++) {
            for (int i1 = 1; i1 <= i; i1++) {
                System.out.print(i+"*"+i1+"="+i*i1+" ");
            }
            System.out.println(" ");
        }
    }
}
